// 环境介绍选项卡部分
let itemList = document.querySelectorAll('.tabs .items ');
let contentItemList = document.querySelectorAll('.content .items');
let cIndex = 0;

for (let i = 0; i < itemList.length; i++) {
    let itemEl = itemList[i];

    itemEl.dataset.i = i;

    itemEl.onclick = function () {
        let index = this.dataset.i;

        itemList[cIndex].classList.remove('header')
        contentItemList[cIndex].classList.remove('show')

        itemList[index].classList.add('header')
        contentItemList[index].classList.add('show')

        cIndex = index;

    }
}
// 发展史选项卡部分
let itemsSList = document.querySelectorAll('.time .itemsS ');
console.log(itemsSList);
let contentSItemList = document.querySelectorAll('.contentS .itemsS');
console.log(contentSItemList);
let cIndexS = 0;

for (let i = 0; i < itemsSList.length; i++) {
    let itemElS = itemsSList[i];

    itemElS.dataset.i = i;

    itemElS.onclick = function () {
        let indexS = this.dataset.i;

        itemsSList[cIndexS].classList.remove('headerS')
        contentSItemList[cIndexS].classList.remove('show')

        itemsSList[indexS].classList.add('headerS')
        contentSItemList[indexS].classList.add('show')

        cIndexS = indexS;

    }
}